import Mock from 'mockjs';



// Mock 用户数据
Mock.mock('/mock/api/web-display/main-display/getDisplayInfo', 'get', {
  result: true,
  msg: '你没有访问权限',
  seachFormInfo: {
    name: 'John Doe',
    age: 25
  }
});

// Mock 用户数据
Mock.mock('/mock/api/user', 'get', {
  code: 200,
  message: '成功',
  data: {
    name: 'John Doe',
    age: 25
  }
});

// Mock 菜单数据
Mock.mock('/mock/api/menu', 'get', {
  code: 200,
  message: '成功',
  data: [
    { id: 1, name: '首页', path: '/home' },
    { id: 2, name: '用户管理', path: '/user' },
    { id: 3, name: '设置', path: '/settings' }
  ]
});

// Mock 获取用户List数据。
Mock.mock('/mock/api/domain-address/user-view/getUserList', 'post', {
  "result": true,
  "msg": "成功",
  "detailMsg": null,
  "type": null,
  "title": null,
  "total": 17,
  "data": null,
  "rows": [
    { "date": "2023-05-03", "name": "Alice", "address": "Beijing" },
    { "date": "2023-05-04", "name": "Bob", "address": "Shanghai" },
    { "date": "2023-05-05", "name": "Charlie", "address": "Guangzhou" },
    { "date": "2023-05-06", "name": "David", "address": "Shenzhen" },
    { "date": "2023-05-07", "name": "Eve", "address": "Hangzhou" },
    { "date": "2023-05-08", "name": "Frank", "address": "Chengdu" },
    { "date": "2023-05-09", "name": "Grace", "address": "Wuhan" },
    { "date": "2023-05-10", "name": "Henry", "address": "Xi'an" },
    { "date": "2023-05-11", "name": "Ivy", "address": "Tianjin" },
    { "date": "2023-05-12", "name": "Jack", "address": "Nanjing" },
    { "date": "2023-05-03", "name": "Alice", "address": "Beijing" },
    { "date": "2023-05-04", "name": "Bob", "address": "Shanghai" },
    { "date": "2023-05-05", "name": "Charlie", "address": "Guangzhou" },
    { "date": "2023-05-06", "name": "David", "address": "Shenzhen" },
    { "date": "2023-05-07", "name": "Eve", "address": "Hangzhou" },
    { "date": "2023-05-08", "name": "Frank", "address": "Chengdu" },
    { "date": "2023-05-09", "name": "Grace", "address": "Wuhan" },
    { "date": "2023-05-10", "name": "Henry", "address": "Xi'an" },
    { "date": "2023-05-11", "name": "Ivy", "address": "Tianjin" },
    { "date": "2023-05-12", "name": "Jack", "address": "Nanjing" },
  ]
});


// Mock 批量删除用户。
Mock.mock('/mock/api/domain-address/user-view/batchDeleteUserList', 'post', {
  "result": true,
  "msg": "成功",
  "detailMsg": null,
  "type": null,
  "title": null,
  "total": 5,
  "data": null,
  "rows": null,
});


Mock.mock('/mock/api/access-control-list-server/accountMenu/selectAccountMenuList', 'post', {
  "result": true,
  "msg": "成功",
  "detailMsg": null,
  "type": null,
  "title": null,
  "total": 5,
  "data": null,
  "rows": null,
});

console.log("Mock.js 已加载");